Skip to content

Tatsiana Kavalchuk #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

p4elopuh
Copy link

No description provided.

@p4elopuh
Copy link
Author

p4elopuh commented May 29, 2019

Пока только код калькулятора

@p4elopuh p4elopuh changed the title [WIP] Tatsiana Kavalchuk Tatsiana Kavalchuk Jun 6, 2019
@dzhigailo
Copy link
Collaborator

  • в пул реквесте присутствую файлы, назначение которых не понятно. final_task/pycalc/my_module.py
  • описание коммитов не несёт смысловой нагрузки Add files via upload
  • множественные вложенные конструкции if, elif, else ухудшают читаемость кода.


def check_brackets(exprstr):
""" Checking for brackets balance """
if ('(' and ')') in exprstr:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В чём назначение этой проверки?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Проверить, если в выражении есть скобки, то сбалансировано ли их количество, а также нет ли закрывающей скобки раньше открывающей.
Но после вопроса уже сомневаюсь в необходимости.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В условиях цейтнота добавила возможность импорта модулей и загрузила тестовые файлы для проверки приоритета функций и констант, и не обратила внимания, что эта функциональность не проверяется скриптом.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Выражение ('(' and ')') всегда будет возвращать ')'. Таким образом if ('(' and ')') in exprstr проверяет есть ли в строке )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants